package com.winning.zjjh.quarzt.job;

import com.winning.zjjh.controller.UDController;
import com.winning.zjjh.entity.ServiceEnum;
import org.quartz.DisallowConcurrentExecution;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.context.ApplicationContext;
import org.springframework.scheduling.quartz.QuartzJobBean;

/**
 * @Author: xkh@winning.com.cn
 * @Desc: TODO
 * @Date: 2019-03-21 14:53
 **/
@DisallowConcurrentExecution
public class EbgcJob extends QuartzJobBean {
    @Override
    protected void executeInternal(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        ApplicationContext applicationContext =
                (ApplicationContext) jobExecutionContext
                        .getMergedJobDataMap().get("applicationContext");
        UDController udc = (UDController) applicationContext.getBean("udc");

        udc.task(ServiceEnum.EbgcEnum);
    }
}
